﻿
using Christian.Helle.PocketNews.PocketPC.Data;
using Christian.Helle.PocketNews.PocketPC.NewsProtocol;
namespace Christian.Helle.PocketNews.PocketPC
{
	public partial class frmDrafts : FormEx
	{
		public frmDrafts()
		{
			InitializeComponent();
		}

		private void frmDrafts_Load(object sender, System.EventArgs e)
		{
			lvDrafts.Items.AddRange(Cache.Drafts);
		}

		private void menuClose_Click(object sender, System.EventArgs e)
		{
			Close();
		}

		private void menuEdit_Click(object sender, System.EventArgs e)
		{

		}

		private void menuDelete_Click(object sender, System.EventArgs e)
		{
			Draft draft = lvDrafts.SelectedItem as Draft;
			if (draft == null)
				return;

			DataAccess.Instance.DeleteDraft(draft.UniqueId);
		}
	}
}